home *** CD-ROM | disk | FTP | other *** search
- Path: magnus.acs.ohio-state.edu!mail-news-gateway
- From: xiaoyi@mozart.bme.ohio-state.edu (Xiaoyi Wu)
- Newsgroups: comp.windows.x,comp.lang.c
- Subject: get text strings from keyboard
- Date: 22 Feb 1996 11:55:38 -0500
- Organization: The Ohio State University
- Sender: root@magnus.acs.ohio-state.edu
- Message-ID: <Pine.SGI.3.91.960222115042.25886A-100000@mozart.bme.ohio-state.edu>
- NNTP-Posting-Host: charm.magnus.acs.ohio-state.edu
-
- Hi, I am a newbie in X programming (X lib right now, no motif) and need
- some help on this:
-
- I need to get a few numbers from the user in a window, is there a
- function available for that purpose? what i am doing now is use KeyPress
- mask to detect keyboard inputs, and i think i must be missing somehting
- here since although XLookupString claims to fill a string buffer i am
- only getting ONE character at a time.
-
- the portion of code looks like this:
-
- case KeyPress:
- res = XLookupString(&myevent,text,100,&mykey,0);
- printf("res=%d, text=%s\n",res,text);
- break;
-
-
- thanks for any help.
-
- Xiaoyi
-